package cn.leaf.chain;

/**
 *
 * desc: 责任链处理
 *
 * @author twinkle-leaf
 * @version v1.0.0
 * slogan: There are no two identical leaves in the world.🍃
 *
 */
abstract class ChainHandler {

    protected ChainHandler nextChainHandler;

    /**
     * 指向下一个处理类
     *
     * @param nextChainHandler 下一个责任处理类对象
     */
    public void setNextChainHandler(ChainHandler nextChainHandler) {
        this.nextChainHandler = nextChainHandler;
    }

    /**
     * 处理方法
     *
     * @param level 等级
     */
    public abstract void handler(Integer level);
}
